<template>
  <div class="box-cards">
    <div class="ranks" v-if="isRank">
      <img v-if="index===0" src="@/assets/images/l1.png" class="rank" alt="">
      <img v-if="index===1" src="@/assets/images/l2.png" class="rank" alt="">
      <img v-if="index===2" src="@/assets/images/l3.png" class="rank" alt="">
    </div>
    <img v-if="item.pic" :src="item.pic" alt="">
    <img v-else src="@/assets/images/3.png" alt="">
    <p class="phone">{{ item.account }}</p>
    <p class="money">${{item.money}}</p>
  </div>
</template>

<script>
  export default {
    props:{
      isRank:{
        default:false
      },
      item:{
        default: {}
      },
      index:{
        default:0
      }
    }
  }
</script>

<style scoped lang="scss">
.box-cards{
  width: 55px;
  height: 84px;
  background: #FFFFFF;
  box-shadow: 0px 4px 4px 0px rgba(163,144,186,0.25);
  border-radius: 10px 10px 10px 10px;
  border: 1px solid #E2D8F3;
  margin-bottom: 10px;
  margin-top: 5px;
  box-sizing: border-box;
  margin-right: 4px;
  margin-left: 4px;
  text-align: center;
  position: relative;
  .ranks{
    position: absolute;
    margin-top: -20px;
    width: 53px;
    text-align: center;
    .rank{
      width: 30px;
      height: 38px;
      object-fit: contain;
    }
  }

  img{
    width: 44px;
    height: 44px;
    object-fit: cover;
  }
  .phone{
    font-weight: 400;
    font-size: 12px;
    color: #3F3F3F;
    text-align: center;
  }
  .money{
    font-weight: bold;
    font-size: 14px;
    color: #5A4CBB;
    text-align: center;
  }
}
</style>